<link href="/css/home/warehouse.css" media="screen" rel="stylesheet" type="text/css" >
<style type="text/css">
    .datatable {
            width:1020px;
            text-align: left;
            font-size: 12px;
            font-family: verdana;
            background: #c0c0c0;
    }

    .datatable thead tr,

    .datatable tfoot tr {
            background: #c0c0c0;
    }

    .datatable tbody tr {
            background: #f0f0f0;
            height: 16px;
    }

    .datatable td, .datatable th {
            border: 1px solid white; height:28px;
    }
    .datatable td {background-color:white;}

    .datatable .hover td {background-color:#99CCFF;}

    .datatable .select td {background-color:#EEEE99;}
    
    table{border-collapse:collapse;}
</style>
<table class="datatable" width="1020px" cellpadding="0" cellspacing="0" id="table" style="margin-top:0px;padding-top: 0px;">
                        <tr align="center">
                            <td style="width:280px;background-color:#555555;height:36px;font-family: verdana;"><font color="#FFFFFF">宝 贝 信 息</font></td>
                            <td style="width:80px;background-color:#666666;"><font color="#FFFFFF">单价</font></td>
                            <td style="width:50px;background-color:#555555;"><font color="#FFFFFF">数量</font></td>
                            <td style="width:100px;background-color:#666666;"><font color="#FFFFFF">实付款</font></td>
                            <td style="width:130px;background-color:#555555;"><font color="#FFFFFF">状态</font></td>
                        </tr>
                        <?php if($this->buylist != ''){
                            foreach ($this->buylist as $Item) {
                                $shopdetail = $Item->shipdetail;
                        ?>
                            <tr>
                                 <td colspan="5" style="background-color: #E5E5E5;height: 32px;">
                                     <a href="/admini/purchase/buydetail/id/<?php echo $Item->id;?>" target="_blank" style="color:#00f;">
                                         <span>订单编号：<?php echo $Item->orderNo ? $Item->orderNo : $Item->getOrderNum();?></span>&nbsp;&nbsp;
                                         <span>时间：<?php echo $Item->dateCreated;?></span>&nbsp;&nbsp;
                                         <?php if($Item->logistics && $Item->logisticsNo){?>
                                         <span>物流信息：<?php echo "[".$Item->logistics."]".$Item->logisticsNo;?></span>&nbsp;&nbsp;
                                         <?php }?>
                                         <span>昵称：<?php echo "昵称";?></span>&nbsp;&nbsp;
                                         <span><?php echo "店铺名称"?></span></a>
                                 </td>
                             </tr>
                             <tr>
                                <?php  if($shopdetail != null){ 
                                            foreach ($shopdetail as $key => $val) { 
                                                 if(count($shopdetail)>1){ 
                                                     if($key > 0){echo "</tr><tr>";}
                                                    }
                                          $productd = $val->byproductd;
                                     ?>
                                     <td valign="middle" style="background-color:#C4C4C4;">
                                        <div style="float:left;">
                                            <a href="<?php if($productd) echo $productd->remoteImage;?>" target="_blank"><img src="<?php if($productd) echo $productd->remoteImage;?>" width="50px" height="50px" style="vertical-align:middle;"/></a>
                                        </div>
                                        <div style="float:left;color:#00f;margin-top: 15px;">
                                            &nbsp;&nbsp;<a href="<?php if($productd)echo $productd->url;?>" target="_blank" style="color:#00f;"><?php echo strlen($val->productName)>15?mb_substr($val->productName,0,15, 'utf-8').'...':$val->productName;?></a>
                                        </div>
                                    </td>
                                 <td class="w1" align="center" style="background-color:#E5E5E5;"><?php echo $val->price;?></td>
                                 <td class="w0" align="center" style="background-color:#C4C4C4;"><?php echo $val->quantity;?></td>
                                 <?php if($key == 0){?>
                                     <td class="w1" style="background-color:#E5E5E5;" rowspan="<?php echo count($Item->shipdetail);?>" align="center">￥<?php echo $Item->sum;?></td>
                                     <td class="w0" style="background-color:#C4C4C4;" rowspan="<?php echo count($Item->shipdetail);?>"align="center"><?php echo $Item->StatusText;?></td>
                                 <?php }}}?>
                             </tr>
                        <?php }}?>
                         <tr>
                            <td colspan="5" align="right">
                                <div class="toolbar" style="height: 35px;padding-top: 0px;">
                                    <?php echo $this->partial('paging.phtml', array("pages" => $this->buyall)); ?>
                                </div>
                            </td>
                        </tr>
                    </table>